package com.woniu.service.impl;

import com.woniu.adapter.WorkingProcedureAdapter;
import com.woniu.outlet.po.WorkingProcedurePo;
import com.woniu.service.WorkingProcedureService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class WorkingProcedureServiceImpl implements WorkingProcedureService {

    @Autowired
    private WorkingProcedureAdapter workingProcedureAdapter;

    @Override
    public List<WorkingProcedurePo> findWorkingProcedures() throws Exception {
        List<WorkingProcedurePo> workingProcedurePos = workingProcedureAdapter.findWorkingProcedures();
        return workingProcedurePos;
    }

    @Override
    public WorkingProcedurePo getWorkingProcedureById(Long id) throws Exception {
        return workingProcedureAdapter.getWorkingProcedureById(id);
    }

    @Override
    public WorkingProcedurePo getWorkingProcedureByWorkingProcedureCode(String code) throws Exception {
        return workingProcedureAdapter.getWorkingProcedureByWorkingProcedureCode(code);
    }

    @Override
    public WorkingProcedurePo getByCode(String code) throws Exception{
        return workingProcedureAdapter.getByCode(code);
    }
}
